{{!< default}} <div id="get-tag-name" tag-name="{{tag.name}}" style="display: none;">
    </div>

    <div class="content-wrap">
        <div id="content" class="content">
            <section id="posts" class="posts-expand">
                {{#foreach posts}}
                <article class="post posts-type-normal">
                    <header class="post-header" data-post-id="">
                        <h1 class="post-title" itemprop="name headline">
                            <a class="post-title-link" href="{{url}}">{{{title}}}</a>
                        </h1>
                        <div class="post-meta">
                            <span class="post-id">{{id}}</span>
                            <span class="post-time">
                                <span class="post-meta-item-icon">
                                    <i class="fa fa-user"></i>
                                </span>
                                <span>{{author}}</span>&nbsp; | &nbsp;
                                <span class="post-meta-item-icon">
                                    <i class="fa fa-calendar-o"></i>
                                </span>
                                <span class="post-meta-item-text">发表于</span>
                                <time>{{date format='YYYY-MM-DD'}}</time>
                            </span>
                            <span class="post-category">&nbsp; | &nbsp;
                                <span class="post-meta-item-icon">
                                    <i class="fa fa-folder-o"></i>
                                </span>
                                <span class="post-meta-item-text">标签</span>
                                <span itemprop="about" itemscope="" itemtype="https://schema.org/Thing">
                                    {{#if tags}} {{tags}} {{/if}}
                                </span>
                            </span>
                            <span class="post-pv">&nbsp; | &nbsp;
                                <span class="post-meta-item-icon">
                                    <i class="fa fa-eye"></i>
                                </span>
                                <span class="post-meta-item-text">阅读数</span>
                                <span class="{{id}}"></span>
                            </span>

                            <span class="post-comments-count">&nbsp; | &nbsp;
                                <a href="{{url}}#comments" itemprop="discussionUrl">
                                    <span class="post-comments-count ds-thread-count" data-thread-key="{{id}}" itemprop="commentsCount"></span>
                                </a>
                            </span>
                        </div>
                    </header>
                    <div class="post-body" itemprop="articleBody">
                        {{excerpt characters="80"}}
                        <div class="post-more-link text-center">
                            <a class="btn" href="{{url}}" rel="contents">阅读全文 »</a>
                        </div>
                    </div>
                </article>
                {{/foreach}}
            </section>
            {{pagination}}
        </div>
    </div>

    <div class="sidebar-toggle">
        <div class="sidebar-toggle-line-wrap">
            <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
            <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
            <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
        </div>
    </div>
    <aside id="sidebar" class="sidebar" style="display: none; width: 320px;">
        <div class="sidebar-inner">
            {{> sidebar}}
        </div>
    </aside>
    <script>
        $(".post-id").each(function () {
            var postId = $(this).text();
            // 查询文章pv
            $.ajax({
                url: CONFIG.APIURL + "/pv?postId=" + postId,
                method: "get",
                dataType: "json",
                success: function (res) {
                    if (res.code === 200) {
                        $("." + postId).text(res.data.pv)
                    } else if (res.code === 10000) {
                        $("." + postId).text(0)
                    }
                }
            })
        })
    </script>